FROM acr.baijia.com/sre/pm2:4.4.0 as pm2

RUN mkdir -p /usr/share/nginx/ssr

# running required command
RUN npm install -g pm2

COPY . /usr/share/nginx/ssr/
WORKDIR /usr/share/nginx/ssr/
ENV NODE_ENV test
# CMD ["cross-env", "PATH_TYPE=test", "pm2", "startOrRestart", "ecosystem.config.js", "--only", "gaotuketang-eva_mweb", "--env test"]
# CMD pm2 startOrRestart ecosystem.config.js --only gaotuketang-eva_mweb --env test --no-daemon
# ENTRYPOINT [ "pm2-runtime", "start", "pm2.json"]
CMD npm run start


# CMD npm run pm2-test-start
# CMD tail -f /usr/share/nginx/ssr/package.json
# CMD npm run start --port 3333
EXPOSE 19888
